#include<iostream>
using namespace std;
int main()
{
	char a='a';
	int b=1;
	double c=2.0;
	float d=3.0;
	cout<<"char a = 'a'"<<endl;
	cout<<"int b = 1 "<<endl;
	cout<<"double c = 2.0 "<<endl;
	cout<<"float d = 3.0 "<<endl;
	cout<<endl;
	cout<<"char + int = "<<a+b<<endl;
	cout<<"char + double = "<<a+c<<endl;
	cout<<"char + float = "<<a+d<<endl;
	cout<<"int + double = "<<b+c<<endl;
	cout<<"int + float = "<<b+d<<endl;
	cout<<"double + float = "<<c+d<<endl;
	cout<<"当无函数左值时，任何类型相加都会被转换成int类型进行计算"<<endl;
	return 0;
}
	
